package com.guimin.common.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * 短信配置
 * @author hzy
 */
@Component
@PropertySource(value = "classpath:aliyun-sms-param.yml",ignoreResourceNotFound = true,encoding = "UTF-8")
@ConfigurationProperties(prefix = "aliyun-sms-param")
public class AliyunSmsParamConfig {
    /**
     * 阿里云大鱼短信服务生成的accessKeyId和accessKeySecret
     */
    @Value("${accessKeyId}")
    public String accessKeyId;
    @Value("${accessKeySecret}")
    public String accessKeySecret;
    /**
     * 短信签名（荷龟）
     */
    @Value("${signName}")
    public String signName;
    /**
     * 短信签名（荷龟支付）
     */
    @Value("${signName2}")
    public String signName2;

    /**
     * 注册模板代码
     */
    @Value("${registerTemplate}")
    public String registerTemplate;
    /**
     * 找回密码模板代码
     */
    @Value("${retrievePwdTemplate}")
    public String retrievePwdTemplate;
    /**
     * 余额变动通知模板代码
     */
    @Value("${retrieveNotifyInfo}")
    public String retrieveNotifyInfo;
    /**
     * 余额变动通知模板代码
     */
    @Value("${retrievePayInfo}")
    public String retrievePayInfo;
    /**
     * 余额变动通知模板代码
     */
    @Value("${retrieveOpenInfo}")
    public String retrieveOpenInfo;

    @Override
    public String toString() {
        return AliyunSmsParamConfig.class.getPackage() +
                ".AliyunSmsParamConfig{" +
                "accessKeyId='" + accessKeyId + '\'' +
                ", accessKeySecret='" + accessKeySecret + '\'' +
                ", signName='" + signName + '\'' +
                ", registerTemplate='" + registerTemplate + '\'' +
                ", retrievePwdTemplate'" + retrievePwdTemplate +'\'' +
                '}';
    }
}
